import React from 'react';
import './App.scss';
import {Route,Redirect,NavLink} from 'react-router-dom'
import Home from './components/home'
import Category from './components/category'
import Cart from './components/cart'
import User from './components/user'

function App() {
  return (
    <div className="App">
      <div className="content">
        <Route path="/home" component={Home} />
        <Route path="/category" component={Category } />
        <Route path="/cart" component={Cart} />
        <Route path="/user" component={User} />
        <Redirect from="/" to="/home"/>
      </div>
      <footer>
        <NavLink to="/home"><i className="sy"></i>首页</NavLink>
        <NavLink to="/category"><i className="fl"></i>分类</NavLink>
        <NavLink to="/cart"><i className="gwc"></i>购物车</NavLink>
        <NavLink to="/user"><i className="wd"></i>个人中心</NavLink>
      </footer>
    </div>
  );
}

export default App;
